package com.youdianda.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysDictMapper {

    /**
     * 获得所有的type
     * @return
     */
    @Select("select type from sys_dict group by type")
    List<String> getType();

    /**
     * 根据type 获取value
     * @param type
     * @return
     */
    @Select("select value from sys_dict where type=#{type}")
    List<String> getTypeValue(@Param("type") String type);
}
